package com.lelouch.examplecode.javabasic.reflect;

public class ClassLoaderChecker {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        MyClassLoader m = new MyClassLoader("D:\\IdeaProjects\\bestpracticemultimodule\\examplecode\\src\\main\\java\\com\\lelouch\\examplecode\\javabasic\\reflect\\", "myClassLoader");
        Class c = m.loadClass("com.lelouch.examplecode.javabasic.reflect.Robot");
        System.out.println("1."+c.getClassLoader());
        System.out.println("2."+c.getClassLoader().getParent());
        System.out.println("3."+c.getClassLoader().getParent().getParent());
        //System.out.println("4."+c.getClassLoader().getParent().getParent().getParent());
        c.newInstance();
    }
}
